<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CustomsfGuardFormSignin
 *
 * @author vi-attik
 */
class CustomsfGuardFormSignin extends sfGuardFormSignin {

    public function configure() {
        unset(
                $this['username']
        );

        $this->setWidgets(array(
            'email_address' => new sfWidgetFormInputText(),
            'password' => new sfWidgetFormInputPassword(array('type' => 'password')),
            'remember' => new sfWidgetFormInputCheckbox(),
        ));

        $this->setValidators(array(
            'email_address' => new sfValidatorEmail(),
            'password' => new sfValidatorString(),
            'remember' => new sfValidatorBoolean(),
        ));
        $this->widgetSchema['email_address']->setLabel('E-Mail');

        $this->setHints(array(
            'email_address' => 'email',
            'password' => 'пароль',
        ));



        $this->validatorSchema->setPostValidator(new CustomsfGuardValidatorUser());

        $this->widgetSchema->setNameFormat('signin[%s]');
    }

}

?>
